<template>
  <div class="youjia-record-layout">
    <snackbar style-color="#4A4A4A"
              back-color="#FAFAFA"
              status-color="#FAFAFA"
              rightText="搜索"
              rightTexts="筛选"
              :fixed="true">

      <template slot="slot">
        <div class="top-layout">
          <van-tabs class="tebs-layout" v-model="active" animated color="#64C367" title-active-color="#64C367"
                    title-inactive-color="#999999" :ellipsis="false" background="#FAFAFA"
                    :line-width="getAdaptiveSize(50)+'px'">
            <van-tab title="全部"></van-tab>
            <van-tab title="司机"></van-tab>
            <van-tab title="加盟用户"></van-tab>
            <van-tab title="会计"></van-tab>
            <van-tab title="项目经理"></van-tab>
            <van-tab title="项目经理"></van-tab>
          </van-tabs>
        </div>
      </template>

    </snackbar>

    <div class="list-layout">
      <div v-if="active ==1||active==0" class="item-layout">
        <template>
          <div class="person">
            <div class="person-one">
              <img class="icon-go" src="@/assets/image/tuPian.jpeg">
            </div>
            <div class="person-two">
              <div class="person-two-one">
                <span>姓名：</span>
                <span>欧阳娜娜</span>
                <span>性别：</span>
                <span>男</span>
              </div>
              <div class="person-two-two">
                <span>电话：</span>
                <span>13607726688</span>
              </div>
              <div class="person-two-three">
                <span>申请类型：</span>
                <span>运输土方司机</span>
              </div>
              <div class="person-two-four">
                <span>编号：</span>
                <span>101</span>
              </div>
            </div>
          </div>
          <div class="persons">
            <span>身份证号：</span>
            <span>450202199901010018</span>
          </div>
          <div class="hengxian"></div>
          <div class="persons-item">
            <div>
              <span>申请时间：</span>
              <span>5月31日 21:01</span>
            </div>
            <div>
              <span :class="{'active':throughNumber==1}" v-if="throughNumber==1" @click="through(1)">已拒绝</span>
              <span :class="{'active':throughNumber==1}" v-if="throughNumber==0" @click="through(1)">拒绝申请</span>
              <span :class="{'active':throughNumber==0}" style=" background: #D6D6D6 ; color: #FFFFFF" >通过申请</span>
            </div>
          </div>
        </template>
      </div>
      <div v-if="active ==1||active==0" class="item-layout">
        <template>
          <div class="person">
            <div class="person-one">
              <img class="icon-go" src="@/assets/image/tuPian.jpeg">
            </div>
            <div class="person-two">
              <div class="person-two-one">
                <span>姓名：</span>
                <span>欧阳娜娜</span>
              </div>
              <div class="person-two-two">
                <span>电话：</span>
                <span>13607726688</span>
              </div>
              <div class="person-two-three">
                <span>申请类型：</span>
                <span>运输土方司机</span>
              </div>
              <div class="person-two-four">
                <span>编号：</span>
                <span>101</span>
              </div>
            </div>
          </div>
          <div class="persons">
            <span>身份证号：</span>
            <span>450202199901010018</span>
          </div>
          <div class="hengxian"></div>
          <div class="persons-item">
            <div>
              <span>申请时间：</span>
              <span>5月31日 21:01</span>
            </div>
            <div>
              <span>拒绝申请</span>
              <span>通过申请</span>
            </div>

          </div>
        </template>
      </div>
      <div v-if="active ==1||active==0" class="item-layout">
        <template>
          <div class="person">
            <div class="person-one">
              <img class="icon-go" src="@/assets/image/tuPian.jpeg">
            </div>
            <div class="person-two">
              <div class="person-two-one">
                <span>姓名：</span>
                <span>欧阳娜娜</span>
              </div>
              <div class="person-two-two">
                <span>电话：</span>
                <span>13607726688</span>
              </div>
              <div class="person-two-three">
                <span>申请类型：</span>
                <span>运输土方司机</span>
              </div>
              <div class="person-two-four">
                <span>编号：</span>
                <span>101</span>
              </div>
            </div>
          </div>
          <div class="persons">
            <span>身份证号：</span>
            <span>450202199901010018</span>
          </div>
          <div class="hengxian"></div>
          <div class="persons-item">
            <div>
              <span>申请时间：</span>
              <span>5月31日 21:01</span>
            </div>
            <div>
              <span>拒绝申请</span>
              <span>通过申请</span>
            </div>

          </div>
        </template>
      </div>

      <div class="item-layout" v-if="active ==2||active==0">
        <template>
          <div class="item-one">
            <span>加盟车主</span>
            <span>申请日期：</span>
            <span>2021-5-31</span>
            <span>详情<img class="icon-go" src="@/assets/image/icon_right.png"></span>
          </div>
          <div class="item-two">
            <div class="item-two-one"><img class="icon-go" src="@/assets/image/tuPian.jpeg"></div>
            <div class="item-two-two">
              <div class="item-text">
                <span>姓名：</span>
                <span>李海亮</span>
              </div>
              <div class="item-text1">
                <span>身份证：</span>
                <span>450205199910100015</span>
              </div>
              <div class="item-text2">
                <span>电话：</span>
                <span>13607726688</span>
              </div>
            </div>
          </div>
          <div class="item-three">
            <span>拒绝</span>
            <span>通过申请</span>
          </div>

        </template>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'auditFailed',
  data() {
    return {
      active: null,
      list: [{}, {}, {}, {}, {}, {}, {}],
      loading: false,
      finished: false,
      refreshing: false,
      throughNumber: 1,
    }
  },
  methods: {
    onRefresh() {
      this.loading = false
      this.refreshing = false
    },
    onLoad() {
      this.loading = false
    },
    through(e) {
      this.throughNumber = e;
    }
  }
}
</script>

<style lang="scss" scoped>
.youjia-record-layout {
  display: flex;
  flex-direction: column;
  align-items: self-start;
  width: 100vw;
  background-color: #F6F6F6;

  .top-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid rgba(219, 219, 219, 0.5);
    width: 100vw;
    background-color: white;

    .tebs-layout {
    }

    .zw {
      flex: 1;
    }

    .sort-text {
      width: 57px;
      font-size: 12px;
      color: #999999;
      margin-right: 10px;
      text-align: center;
    }

  }

  .list-layout {
    width: 100vw;
    min-height: 95vh;
    margin-top: 50px;
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;

    .item-layout {
      width: 94%;
      height: 30vh;
      background-color: #FFFFFF;
      border-radius: 6px;
      margin-top: 14px;
      padding-bottom: 10px;
      box-shadow: 1px 1px 10px #DEDEDE;

      .person {
        width: 100%;
        display: flex;
        margin-top: 15px;

        .person-one {
          width: 40%;
          height: 15vh;
          position: relative;

          .icon-go {
            width: 60px;
            height: 60px;
            position: absolute;
            top: 0;
            bottom: 0;
            right: 25%;
            left: 0;
            margin: auto;
            border-radius: 50px;
          }
        }

        .person-two {
          width: 60%;
          height: 15vh;
          color: #9B9B9B;
          font-size: 0.4rem;

          div {
            margin-top: 4px;
          }

          .person-two-one {
            span:nth-child(2) {
              color: #333333;
              display: inline-block;
              width: 40%;
            }

            span:nth-child(3) {
              display: inline-block;
              width: 25%;
              text-align: right;
            }
          }

          .person-two-two {
            span:nth-child(2) {
              color: #333333;
            }
          }

          .person-two-three {
            span:nth-child(2) {
              color: #333333;
            }
          }

          .person-two-four {
            span:nth-child(2) {
              color: #333333;
            }
          }
        }
      }

      .persons {
        font-size: 0.4rem;
        margin-left: 3%;
        margin-top: 5px;

        span:nth-child(1) {

          color: #9B9B9B;
        }
      }

      .hengxian {
        width: 94%;
        height: 1px;
        background-color: rgba(201, 201, 201, 0.5);
        margin: 10px auto 0 auto;
      }

      .persons-item {
        font-size: 0.4rem;
        color: #9B9B9B;
        margin-left: 2%;
        margin-top: 18px;
        display: flex;

        div:nth-child(1) {
          width: 50%;
        }

        div:nth-child(2) {
          width: 50%;
          text-align: right;

          span:nth-child(1) {
            display: inline-block;
            width: 40%;
            height: 4vh;
            margin-right: 5%;
            line-height: 4vh;
            text-align: center;
            border-radius: 5px;
            border: 1px solid #979797;
          }

          span:nth-child(2) {
            display: inline-block;

            margin-right: 5%;
            width: 40%;
            height: 4vh;
            line-height: 4vh;
            text-align: center;
            border-radius: 5px;
            border: 1px solid #979797;
          }

        }

        .active {
          display: inline-block;
          color: #ffffff;
          background: #FA6400;
          height: 3.8vh !important;
          line-height: 3.8vh !important;
          border: 1px solid #FA6400 !important;
        }


      }


      .item-one {
        width: 94%;
        height: 8vh;
        //background: #00a2ff;
        margin: 0 auto;
        line-height: 8vh;
        font-size: 0.45rem;

        span:nth-child(1) {
          display: inline-block;
          width: 35%;
          height: 4vh;
          line-height: 4vh;
          background: #d0edd1;
          color: #64C367;
          border-radius: 4px;
          text-align: center;

        }

        span:nth-child(2) {
          margin-left: 2%;
          color: #B4B4B4;
          font-size: 0.4rem;
        }

        span:nth-child(3) {
          width: 26%;
        }

        span:nth-child(4) {
          float: right;
          //margin-right: 2%;
          .icon-go {
            padding-left: 2px;
            width: 15px;
            height: 15px;
          }
        }

      }

      .item-two {
        display: flex;

        .item-two-one {
          width: 35%;
          height: 15vh;
          position: relative;

          .icon-go {
            width: 80px;
            height: 80px;
            position: absolute;
            top: 0;
            bottom: 0;
            right: 0;
            left: 0;
            margin: auto;
            border-radius: 10px;
          }
        }

        .item-two-two {
          width: 60%;
          height: 15vh;
          color: #B4B4B4;
          font-size: 0.4rem;

          .item-text {
            //display: inline-block;
            span:nth-child(2) {
              font-size: 0.5rem;
              color: #000000;
            }
          }

          .item-text1 {
            margin-top: 10px;

            span:nth-child(2) {
              color: #000000;
            }
          }

          .item-text2 {
            margin-top: 10px;
            float: right;

            span:nth-child(2) {
              color: #82cf84;
            }
          }


        }

      }

      .item-three {
        font-size: 0.4rem;
        text-align: right;
        margin-right: 5%;
        margin-top: 10px;

        span:nth-child(1) {
          margin-right: 5%;
          color: #FA6400;
          display: inline-block;
          width: 22%;
          height: 3.5vh;
          line-height: 3.5vh;
          text-align: center;
          border-radius: 3px;
          border: 1px solid #FA6400;
        }

        span:nth-child(2) {
          display: inline-block;
          width: 22%;
          height: 3.5vh;
          line-height: 3.5vh;
          text-align: center;
          color: #64C367;
          border-radius: 3px;
          border: 1px solid #64C367;
        }
      }




    }
  }
}

</style>
